﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CodeVisual
{
    public partial class NewProjectDialog : Form
    {
        public ProjectType tp = ProjectType.PHP;

        public NewProjectDialog()
        {
            InitializeComponent();
            radioButtonPHP.Select();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                label1.Text = "Empty project name !";
                return;
            }
            this.DialogResult = DialogResult.OK;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void radioButtonCS_CheckedChanged(object sender, EventArgs e)
        {
            this.tp = ProjectType.C_SHARP;
        }

        private void radioButtonCPP_CheckedChanged(object sender, EventArgs e)
        {
            this.tp = ProjectType.CPP;
        }
    }
}
